package com.example.service2.service;

import com.example.service2.feign.TestFeignService;
import io.seata.spring.annotation.GlobalTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @oauth Yeohwah
 * @createDate 2021/10/17
 * @info
 */
@Service
public class TestService {

    @Autowired
    private TestFeignService testFeignService;

    @GlobalTransactional
    public String bizSaveAll(){
        String info1 = testFeignService.save1();
        String info2 = testFeignService.save2();
        int a = 1/0;
         return "========="+info1 + info2;
    }
}
